package junit;

import static org.junit.Assert.*;

import org.junit.Test;

import parser.Case;
import parser.EffortEstimator;


public class TestEffortEstimator {
	@Test
	public void testCalculate(){
		EffortEstimator eff = new EffortEstimator(150);
		Case c1 = new Case(90, 200, 1000);
		Case c2 = new Case(50, 175, 950);
		eff.addCase(c1);
		eff.addCase(c2);
		
		double result = eff.calculate();
		boolean acceptable = false;
		if(((result*0.9) < 773)&&((result*1.1)> 773)){
			acceptable = true;
		}
		
		System.out.println(result);
		
		assertTrue(acceptable);
	}
	
	
}
